package edu.study.ops.req;

import edu.study.api.common.dto.BaseReqDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotNull;
import java.io.InputStream;

@Setter
@Getter
@ApiModel("分片上传文件")
public class UploadSplitFileReq extends BaseReqDto {

	private static final long serialVersionUID = -5458175418626583236L;
	
	@NotEmpty(message = "文件流不能为空")
	@ApiModelProperty("文件流")
	private InputStream instream;
	
	@NotNull(message = "文件流大小不能为空")
    @ApiModelProperty("文件流大小")
    private Long partSize;
    
	@NotNull(message = "文件流编号不能为空")
	@ApiModelProperty("文件流编号")
    private Integer partNo;
	
	@NotNull(message = "文件流总数不能为空")
	@ApiModelProperty("文件流总数")
    private Integer partCount;
	
	@NotEmpty(message = "文件名不能为空")
	@ApiModelProperty("文件名")
    private String fileName;
	
	@NotEmpty(message = "uploadId不能为空")
	@ApiModelProperty("uploadId")
    private String uploadId;
}
